﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
	CodeFile="mainMenu.aspx.cs" Inherits="mainMenu" %>

<%@ Register TagPrefix="carpool" TagName="SearchResults" Src="~/SearchResultsControl.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="placeholderHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="placeholderBody" runat="server">
	<div>
		<h1>
			Main Menu</h1>
	</div>
	<table>
		<tbody>
			<tr>
				<td valign="top" class="panel">
					<h2>
						My Schedule Matches</h2>
					<carpool:SearchResults ID="ctrlSearchResults" runat="server" />
					
					<asp:LinkButton ID="linkAdvancedSearch" runat="server" Text="Perform Custom Search" OnClick="btnSearch_Click" />
				</td>
				<td class="panel" valign="top">
					<h2>
						My Profile</h2>
					<strong>Name:</strong>
					<asp:Label ID="lblName" runat="server" /><br />
					<strong>Email Address:</strong>
					<asp:Label ID="lblEmail" runat="server" /><br />
					<strong>ZIP Code:</strong>
					<asp:Label ID="lblZip" runat="server" />
					<br />
					<br />
					<asp:LinkButton ID="linkEditProfile" runat="server" Text="Edit My Account" OnClick="linkEditProfile_Click" />
				</td>
				<td class="panel" valign="top">
					<h2>
						My Schedule</h2>
					<table>
						<thead>
							<tr>
								<th>
									Day of Week
								</th>
								<th>
									Arrival Time to School
								</th>
								<th>
									Departure Time from School
								</th>
							</tr>
						</thead>
						<tbody>
						<%	int i = 0;
							foreach (Schedule schedule in this.schedules) {
								string clazz = "even";
								if (i == 1) {
									clazz = "odd";
								} %>
								<tr>
									<td class="<%=clazz %>">
										<%=schedule.DayOfWeek.ToString()%>
									</td>
									<td class="<%=clazz %>">
										<%=schedule.ReturnHour%>:00
									</td>
									<td class="<%=clazz %>">
										<%=schedule.DepartureHour%>:00
									</td>
								</tr>
						<%		i = (i + 1) % 2;
							} %>
						</tbody>
					</table>
					<br />
					<asp:LinkButton ID="linkEditSchedule" runat="server" Text="Edit My Schedule" OnClick="linkEditSchedule_Click" />
				</td>
			</tr>
		</tbody>
	</table>
</asp:Content>
